package root.sport_manager.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import root.sport_manager.entity.po.User;
import root.sport_manager.mapper.UserMapper;
import root.sport_manager.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author root
 * @since 2021-07-02
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;


    @Override
    public int addUser(User user) {
        user.setCreateTime(LocalDateTime.now());
        return userMapper.insert(user);
    }
}
